/**
 * @author furthurr
 */
var win = Titanium.UI.currentWindow;
win.backgroundColor = 'white';
win.backgroundImage = '../imgs/WallLicenciaturas.png';
//ELEMENTOS
var medicinaLabel=Titanium.UI.createLabel({
    text:'Medicina y Salud',
    backgroundlColor: 'transparent',
	width:'125',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    	textAlign:'center'	
});
var medicina = Titanium.UI.createButtonBar({
 	style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
	backgroundColor:'#C0C0C0',
    labels:[''],
	top:278,	
	left:0,
    height:26,
    width:155		
});
medicina.add(medicinaLabel);
var humanidadesLabel=Titanium.UI.createLabel({
    text:'Humanidades',
    backgroundlColor: 'transparent',
	width:'125',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    	textAlign:'center'	
});
var humanidades = Titanium.UI.createButtonBar({
 	style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
	backgroundColor:'#C0C0C0',
    labels:[''],
	top:311,	
	left:0,
    height:26,
    width:155	
});
humanidades.add(humanidadesLabel);
var socialesLabel=Titanium.UI.createLabel({
    text:'Ciencias Sociales',
    backgroundlColor: 'transparent',
	width:'125',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    	textAlign:'center'	
});
var sociales = Titanium.UI.createButtonBar({
	style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
	backgroundColor:'#C0C0C0',
    labels:[''],
	top:344,	
	left:0,
    height:26,
    width:155	
});
sociales.add(socialesLabel);
var economicasLabel=Titanium.UI.createLabel({
    text:'Ciencias Economicas',
    backgroundlColor: 'transparent',
	width:'125',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    	textAlign:'center'	
});
var economicas = Titanium.UI.createButtonBar({
	style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
	backgroundColor:'#C0C0C0',
    labels:[''],
	top:377,	
	left:0,
    height:26,
    width:155
});
economicas.add(economicasLabel);
var ingenieriaLabel=Titanium.UI.createLabel({
    text:'Ingenieria e Industria',
    backgroundlColor: 'transparent',
	width:'125',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    	textAlign:'center'	
});
var ingenieria = Titanium.UI.createButtonBar({
 	style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
	backgroundColor:'#C0C0C0',
    labels:[''],
	top:410,	
	left:0,
    height:26,
    width:155		
});
ingenieria.add(ingenieriaLabel);
var bcloseLabel=Titanium.UI.createLabel({
    text:'Menu',
    backgroundlColor: 'transparent',
	width:'125',
	height:'auto',
	font:{fontSize:13, fontFamily:'AppleGothic'},
    	textAlign:'center'	
});
var bclose = Titanium.UI.createButtonBar({
	style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
	backgroundColor:'#C0C0C0',
    labels:[''],
	top:245,	
	left:0,
    height:26,
    width:155
}); 
bclose.add(bcloseLabel);

win.add(medicina);
win.add(humanidades);
win.add(sociales);
win.add(economicas);
win.add(ingenieria);
win.add(bclose);

//EVENTOS
medicina.addEventListener('click',function (e){
	Titanium.API.info("Medicina ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./medicina/appMedicina.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});
humanidades.addEventListener('click',function (e){
	Titanium.API.info("Humanidades ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./humanidades/appHumanidades.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});
sociales.addEventListener('click',function (e){
	Titanium.API.info("Humanidades ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./sociales/appSociales.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});
economicas.addEventListener('click',function (e){
	Titanium.API.info("Humanidades ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./economicas/appEconomicas.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});
ingenieria.addEventListener('click',function (e){
	Titanium.API.info("Ingenieria ... clicked");
	var next = Titanium.UI.createWindow({
		url:'./ingenieria/appIngenieria.js'
	});
	next.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_UP});
});
bclose.addEventListener('click', function(e) {
  Titanium.API.info("ventana de licenciaturas cerrada");
  var Menu = Titanium.UI.createWindow({
  	url:'../ModMenu/appMenu.js'
  });
  Menu.open({transition:Ti.UI.iPhone.AnimationStyle.CURL_DOWN});
});

